﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace S.Organization.Infrastructure
{
    public interface IBaseRepository<T> where T : class
    {
        Task<int> CreateAsync(T entity);

        Task<int> UpdateAsync(T entity);

        Task<int> DeleteAsync(List<T> t);

        Task<T> GetAsync(int id);

        Task<List<T>> GetAllAsync();

        Task<List<T>> SelAllAsync(Expression<Func<T, bool>> expression);
  
        Task<int> DeleteAsync(int id);

        Task<int> BatchDeleteAsync(string id);

        Task<int> DeleteAllAsync(Expression<Func<T, bool>> expression);
          
        Task<IQueryable<T>> AllAsync();

        //Task<List<T>> GetValues(Expression<Func<T, bool>> expression);

    }
}
